<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="content" class="col-lg-10 col-sm-10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a>
            </li>
            <li>
                <a href="#">View TimeTable for Student</a>
            </li>
        </ul>
    </div>



    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>Time Table for : <c:if test="${sessionScope.division.semester eq 1}">${sessionScope.division.semester}st</c:if>
                        <c:if test="${sessionScope.division.semester eq 2}">${sessionScope.division.semester}nd</c:if>
                        <c:if test="${sessionScope.division.semester eq 3}">${sessionScope.division.semester}rd</c:if>
                        <c:if test="">${sessionScope.division.semester}th</c:if>
                        ${sessionScope.division.branch.name} ${sessionScope.division.name} </h2>

                    <div class="box-icon">

                    </div>
                </div>
                <div class="box-content">
                    <table class="table">
                        <thead>
                            <tr>
                                <c:if test="${sessionScope.save eq true}">
                                    <th>Days</th>
                                        <c:forEach var="day" items="${sessionScope.days}" varStatus="i">
                                        <th>
                                            <c:if test="${i.count eq 1}">
                                                Monday
                                            </c:if>
                                            <c:if test="${i.count eq 2}">
                                                Tuesday
                                            </c:if>
                                            <c:if test="${i.count eq 3}">
                                                Wednesday
                                            </c:if>
                                            <c:if test="${i.count eq 4}">
                                                Thursday
                                            </c:if>
                                            <c:if test="${i.count eq 5}">
                                                Friday
                                            </c:if>
                                            <c:if test="${i.count eq 6}">
                                                Saturday
                                            </c:if>
                                        </th>                                  
                                    </c:forEach>

                                </tr>
                            </thead>
                            <tbody>

                                <c:forEach begin="1" end="${sessionScope.parameters.lecturesperday}" var="i">
                                    <tr id="tr_${day.get(i-1).id}">
                                        <td>${i}</td>
                                        <c:forEach  var="day" items="${sessionScope.days}" >

                                            <td class="center" <c:if test="${day.get(i-1).type eq false}"> style="background:yellow" </c:if> id="td_id_${day.get(i-1).id}">
                                                ${day.get(i-1).faculty.fname} &nbsp; ${day.get(i-1).faculty.lname}   
                                                <br>
                                                ${day.get(i-1).subject.name}
                                            </td>
                                        </c:forEach>
                                    </tr>
                                </c:forEach>
                            </c:if>
                            <c:if test="${sessionScope.save eq false}">
                                NOT GENERATED YET......
                            </c:if>

                        </tbody>
                    </table>

                </div>
            </div>
        </div>
        <!--/span-->


        <!--/span-->
    </div>

</div>
